<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
	<title>QQ登陆</title>
<link rel="stylesheet" href="static/login_files/css/login.css" />


<style type="text/css">
	body{
		background-image:url(static/login_files/true.jpg);
		background-size:100% 100%;
	}
</style>
</head>  

		
		<style type="text/css">
		.one{
			font-size: 17px;
			height: 50px;
			width: 300px;
			margin-top: 10px;
		}
		
	
		#leve_one{
			font-size: 20px;
    		color: #333;
			text-align: center;
			margin-top: 300px;
		}
		
		
		#leve_three{
			margin-top: 30px;
		}
		
		#leve_foure{
			text-align: center;
		}
		
		
		.link{
			color: #666;
			font-size: 12px;
			text-decoration: none;
		}
		
		
		.btn{
			width: 100%;
    		height: 40px;
    		line-height: 35px;
    		border: none;
    		font-size: 17px;
    		font-weight: 400;
    		color: #fff;
    		background-color: #67B168;
    		margin-top: 10px;
		}
		
		
		.err{
			font-size:17px;
			color: #ff5b5b;
			font-style: initial;
			font-weight: bold;
			display: block;
		}
		.txterr{
			font-size: 17px;
			height: 50px;
			width: 300px;
			margin-top: 10px;
			/*border: 1px solid red;*/
			
		}
	</style>
	<script type="text/javascript">

		function $(id){
			return document.getElementById(id);
		}
		
		function isNull(content){
			return /^\s+$/.test(content) || content=="";
		}
		
		function checkqAccount(){
			var txtqAccount=$("qAccount");
			if(isNull(txtqAccount.value)){
				$("qAccountErr").innerHTML="姓名不能为空";
				txtqAccount.className="txterr";
				return false;
			}
			
			
			$("qAccountErr").innerHTML="";
				return true;			
		}

		function checkqPwd(){
			var txtqPwd=$("qPwd");
			if(isNull(txtqPwd.value)){
				$("qPwdErr").innerHTML="密码不能为空";
				txtqPwd.className="txterr";
				return false;
			}
			
			$("qPwdErr").innerHTML="";
				return true;
		}
		
		function checkAll(){
			if(checkqAccount() & checkqPwd()){
				return true;
			}
			return false;
		}
		
	</script>
		
		
		
	
	<body>
	<div id="leve_one">
			账号密码登录
		</div>
		
		
		<div id="leve_two">
		<form action="front/login_submit" method="post" id="leve_three" onsubmit="return checkAll()">
			<table border="0px" align="center">
				<tr>
					
					<td>
						<input  class="one" type="text" name="qAccount" id="qAccount" onblur="checkqAccount()" placeholder="请输入用户名"/>
						<span id="qAccountErr" class="err"></span>
					</td>
					
				</tr>
				
				<tr>
					
					<td>
						<input class="one" type="password" name="qPwd" id="qPwd" onblur="checkqPwd()" placeholder="请输入密码"/>
						<span id="qPwdErr" class="err"></span>
					</td>
					
				</tr>
												
				<tr>
					
					<td colspan="1">
						<input class="btn" type="submit" value="登录"/>
					</td>
				</tr>
				
			</table>
		</form>
		
		<div id="leve_foure">
			<a href="register" class="link">注册新帐号</a>
		</div>
		
		
		</div>

	</body> 
	
	
</html>
